## Script (Python) "getCountryName"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=country_code
##title=Return the country name given by the country_code
##

country_list = context.availableCountries()
country_name = u"Undefined Country"

"""Loop through the list of tuples. View the availableCountries.py script to see the format.
"""
for countryData in country_list:
    if countryData[0].upper().strip() == country_code.upper().strip():
        country_name = countryData[2]

return country_name
